FROM beimei6/hadoop

ADD apache-zookeeper-3.5.6-bin.tar.gz /usr/local/


ENV ZK_HOME /usr/local/apache-zookeeper-3.5.6-bin
ENV PATH $ZK_HOME/bin:$PATH
COPY zoo.cfg $ZK_HOME/conf/
RUN mkdir -p /var/lib/zookeeper
ENV DATA_DIR /var/lib/zookeeper
RUN touch $DATA_DIR/myid
ENTRYPOINT ["sh" ,"-c","echo $MY_ID > $DATA_DIR/myid;service ssh start;zkServer.sh start-foreground"]